from environment.unit.base.Shape import Group, Box


class Base(Group):
    base_z = 0

    def construct(self, vs=None):
        super().construct(vs)
        defaults = {
            'length': 5000,
            'width': 5000,
            'xyz_mode': 0
        }
        defaults.update(self.vs)
        if self.vs['xyz_mode'] == 0:
            box = self.add_object(Box([self.vs['length'], self.vs['width'], 20]), 'box')
        elif self.vs['xyz_mode'] == 1:
            box = self.add_object(Box([self.vs['length'], 20, self.vs['width']]), 'box')
        elif self.vs['xyz_mode'] == 2:
            box = self.add_object(Box([20, self.vs['length'], self.vs['width']]), 'box')


# base().show()
# sys.exit()